<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
                xmlns:s="http://jboss.com/products/seam/taglib"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:rich="http://richfaces.org/rich"
                xmlns:a="http://richfaces.org/a4j">
               
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />   
<head>
	<style type="text/css">
		.fontStyle {
			font-family: "宋体";
			font-size:15px;
		}
	</style>
</head> 
        
<body>
	<h:messages globalOnly="true" styleClass="message"/>
    <rich:panel> 
    	<div class = "fontStyle">
    	<f:facet name="header">添加商品</f:facet>
        <h:form id="AddProductForm" styleClass="register" enctype="multipart/form-data">
           <table width = "80%">
               	<tr>
               		<td>商品名<em>*</em></td>					
					<td><h:inputText  id="productName" value="#{newProduct.productName}" required="true" />	</td>										 
        		</tr>
        		
                <tr>
               		<td>商品编号<em>*</em></td>				
					<td><h:inputText id="productCode" value="#{newProduct.productCode}" required="true" /></td>											
        		</tr>
        		
                <tr>
               		<td>价格<em>*</em></td>				
					<td><h:inputText id="price" value="#{newProduct.price}" required="true" /></td>											
        		</tr>
        		
                <tr>
               		<td>权值<em>*</em></td>				
					<td><h:inputText id="rightValue" value="#{newProduct.rightValue}" required="true" /></td>											
        		</tr>
        		
                <tr>
               		<td>主图片<em>*</em></td>				
					<td><s:fileUpload data="#{addProduct.data}" fileName="#{newProduct.mainPic}" accept="gif,jpg,jpeg,png" /></td>											
        		</tr>
        		<tr>
               		<td>入库日期<em>*</em></td>				
					<td><rich:calendar id="date" value="#{newProduct.arriveDate}" required="true" datePattern="MM/dd/yyyy" buttonIcon="images/ellipsis.png" /></td>											
        		</tr>				 
	
				 <tr>
               		<td>颜色<em>*</em></td>				
					<td>
						<h:selectOneMenu id="color"  value="#{addProduct.color}">
							<s:selectItems value="#{colors}" var="color"
								label="#{color.valueName}"  noSelectionLabel="Please Select ...." />	
							<s:convertEntity/>						 		
						</h:selectOneMenu>
					</td>											
        		</tr>
				
				<tr>
               		<td>长度样式<em>*</em></td>				
					<td>
						<h:selectOneMenu id="length" value="#{addProduct.length}">
							<s:selectItems value="#{lengths}" var="length"
								label="#{length.valueName}" noSelectionLabel="Please Select ...." />	
							<s:convertEntity/>						 		
						</h:selectOneMenu>
					</td>											
        		</tr>
				
				<tr>
               		<td>设计样式<em>*</em></td>				
					<td>
						<h:selectOneMenu id="design" value="#{addProduct.design}">
							<s:selectItems value="#{designs}" var="design"
								label="#{design.valueName}" noSelectionLabel="Please Select ...." />						 		
							<s:convertEntity/>	
						</h:selectOneMenu>
					</td>											
        		</tr>
				<tr>
               		<td>修饰样式<em>*</em></td>				
					<td>
						<h:selectOneMenu id="style" value="#{addProduct.style}">
							<s:selectItems value="#{styles}" var="style"
								label="#{style.valueName}" noSelectionLabel="Please Select ...." />						 		
							<s:convertEntity/>	
						</h:selectOneMenu>
					</td>											
        		</tr>				
				<tr>
               		<td>裤腰样式<em>*</em></td>				
					<td>
						<h:selectOneMenu id="waist" value="#{addProduct.waist}">
							<s:selectItems value="#{waists}" var="waist"
								label="#{waist.valueName}" noSelectionLabel="Please Select ...."  />						 		
							<s:convertEntity/>	
						</h:selectOneMenu>
					</td>											
        		</tr>	
        		<tr>
            		<td>商品描述<em>*</em></td>				
					<td><h:inputTextarea id="descript" width = "300"  value="#{newProduct.descript}" required="true" /></td>											
        		</tr>
        		<tr>
					<td>
						<br />
						<h:commandButton id="addProduct" value="继续" size = "19" action="#{addProduct.startAddPicture}"/>  
					</td>
				</tr>							          		 			
          </table>                       			 
        </h:form>
        </div>
    </rich:panel>

</body>
</html>
